function y = indef(x)
% indef function
% x0=[1/m, 2/m,...,n/m]; m=n+1;
n=length(x);
y=0; tp1=0; tp2=0;
for i=1:n
    tp1=tp1+x(i);
end

for j=1:n-1
    tp2=tp2+0.5*cos(2*x(i)-x(n)-x(1));
end

y=tp1+tp2+y;


